import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
import HomePage from '@/views/HomePage'
import News from '@/views/News'
import Sport from '@/views/Sport'
import One from '@/views/second/One'
import Two from '@/views/second/Two'
import Three from '@/views/second/Three'
// 分割线--------------------------------------------------------
import UiRouter from '@/views/UiRouter'
import Contacts from '@/views/Contacts'
import About from '@/views/About'
import AllContacts from '@/views/second/AllContacts'
import Alice from '@/views/second/Alice'
import Bob from '@/views/second/Bob'
import Blog from '@/views/second/Third/Blog'
import Fax from '@/views/second/Third/Fax'
const router = new VueRouter({
  routes: [
    {
      path: '/homepage',
      component: HomePage,
    },
    {
      path: '/news',
      component: News,
    },
    {
      path: '/sport',
      component: Sport,
      children: [
        {
          path: 'one',
          component: One,
        },
        {
          path: 'two',
          component: Two,
        },
        {
          path: 'three',
          component: Three,
        },
      ],
    },
    // 以上为二级路由配置
    {
      path: '/uirouter',
      component: UiRouter,
    },
    {
      path: '/contacts',
      component: Contacts,
      children: [
        {
          path: 'allcontacts',
          component: AllContacts,
        },
        {
          path: 'alice',
          component: Alice,
        },
        {
          path: 'bob',
          component: Bob,
          children: [
            {
              path: 'blog',
              component: Blog,
            },
            {
              path: 'fax',
              component: Fax,
            },
          ],
        },
      ],
    },
    {
      path: '/about',
      component: About,
    },
  ],
})
export default router
